#include "cipherfactory.h"

CCipherFactory::CCipherFactory(QObject *parent) : QObject(parent)
{

}


CCipher * CCipherFactory::buildCipher(int type)
{
    CCipher *cipher = nullptr;

    switch (type) {
    case 0:
        cipher = new CAes();
        break;
    case 1:
        cipher = new CDes();
        break;
    case 2:
        cipher = new C3Des();
        break;
    case 3:
        cipher = new CHash();
        break;
    default:
        break;
    }

    return cipher;
}
